<template>
  <div>
    <HomeHeader></HomeHeader>
    <BannerSwiper></BannerSwiper>
    <NavHeader></NavHeader>
    <NoticeHeader></NoticeHeader>
  </div>
</template>

<script>
import HomeHeader from './components/home-header.vue'
import BannerSwiper from './components/banner-swiper.vue'
import NavHeader from './components/nav-header.vue'
import NoticeHeader from './components/notice-header.vue'
import { SimplePromise } from '@/utils/promise'

export default {
  data() {
    return {
      a: 1
    }
  },
  components: {
    HomeHeader,
    BannerSwiper,
    NavHeader,
    NoticeHeader
  },
  mounted() {
    // new MyPromise(()=>{
    //   setTimeout(() => {
    //     // resolve(100)
    //   }, 1000)
    // }).then(res => {
    //   console.log('res', res);
    // })
    new SimplePromise((resolve) => {
      console.log("111");
      let self = this
      setTimeout(function() {
        console.log('this', self.a);
        resolve(222)
      }, 2000);
    }).then(data => console.log(data), err => console.log(err))
  }
}
</script>

<style>

</style>